package com.ruoyi.utils;

import java.util.Random;

/**
 * @ClassName WebConstants
 * @Description
 * @Author huangshun
 * @Date 2021/12/16 20:30
 */
public class WebConstants {

    /*
     * secretId
     */
    public static final   String ACCESSKEY = "AKIDN8rKWN8qSzSt40HgncM00vbdUcU5tVfb";
    /*
     * secretKey
     */
    public static final  String SECRETKEY ="ztRkolStYAINCk2WmmZ3HCqudFQJw4vY";

    /*
     * 应用id
     */
    public static final String  SmsSdkAppid = "1400482504";
    /*
     * 签名
     */
    public static final String  Sign = "亿器网";
    /*
     * 请求地址
     */
    public static final String  Endpoint = "sms.tencentcloudapi.com";
    /*
     * 国内注册模板id
     */
    public static final String TEMPLATEID_REGISTER = "864129";
    /*
     * 国内登录模板id
     */
    public static final String TEMPLATEID_LOGIN = "864120";
    /*
     * 国内重置密码模板id
     */
    public static final String TEMPLATEID_RESTPASSWORD = "1064919";

    /**
     * 生成随机验证码
     */
    public static String generateNumber() {
        String base = "0123456789";
        Random random = new Random();
        StringBuffer sb = new StringBuffer();
        for (int i = 0; i < 6; i++) {
            int number = random.nextInt(base.length());
            sb.append(base.charAt(number));
        }
        return sb.toString();
    }
}
